<template>
	<view class="content">
		<u-empty
		        mode="message"
		       :textSize="48"
			   v-if="noticeList.length==0"
		>
		</u-empty>
		
		<u-cell-group v-if="noticeList.length>0">
			<u-cell v-for="item in noticeList"
				:title="item.noticeTitle"
				:is-link="true"
				@click="showDetailNotice(item.noticeId)"
				titleStyle="fontSize:13px;"
			>
				
			</u-cell>
				
		</u-cell-group>
	</view>
</template>

<script>
	import {loadLastTwentyNotice} from '@/api/notice.js'
	export default{
		data(){
			return{
				noticeList:[],
				queryParams:{
					pageNum:1,
					pageSize:20
				}
			}
		
		},
		onReady() {
			this.loadNotice();
		},
		methods:{
			loadNotice(){
				let that=this;
				loadLastTwentyNotice(this.queryParams).then(res=>{
					that.noticeList=res.rows;
				})
			},
			showDetailNotice(noticeId){
				uni.navigateTo({
					url:"/pages/notice/NoticeDetail?noticeId="+noticeId
				})
				
			}
		}
	}
</script>

<style>
</style>